<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bayesian Network: bn::adjacency_matrix Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Bayesian Network
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>bn</b></li><li class="navelem"><a class="el" href="classbn_1_1adjacency__matrix.html">adjacency_matrix</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classbn_1_1adjacency__matrix-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">bn::adjacency_matrix Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Implement class of adjacency matrix for <a class="el" href="classbn_1_1network.html" title="Provide a functions for each graph representing class. ">bn::network</a>.  
 <a href="classbn_1_1adjacency__matrix.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="adjacency__matrix_8hpp_source.html">adjacency_matrix.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a75bf5ccbd6f08d5f8108274d0fad4b7f"><td class="memItemLeft" align="right" valign="top"><a id="a75bf5ccbd6f08d5f8108274d0fad4b7f"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>this_type</b> = <a class="el" href="classbn_1_1adjacency__matrix.html">adjacency_matrix</a></td></tr>
<tr class="separator:a75bf5ccbd6f08d5f8108274d0fad4b7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9a26b2157ea569132b6fa098dbb4b60"><td class="memItemLeft" align="right" valign="top"><a id="aa9a26b2157ea569132b6fa098dbb4b60"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>node_ptr</b> = component::node_ptr</td></tr>
<tr class="separator:aa9a26b2157ea569132b6fa098dbb4b60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4e789a99a16dfc994f6e743f70accac"><td class="memItemLeft" align="right" valign="top"><a id="ac4e789a99a16dfc994f6e743f70accac"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>arc_ptr</b> = component::arc_ptr</td></tr>
<tr class="separator:ac4e789a99a16dfc994f6e743f70accac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae08a701f23b9d66e50801532769d7e06"><td class="memItemLeft" align="right" valign="top"><a id="ae08a701f23b9d66e50801532769d7e06"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>node_const_ptr</b> = <a class="el" href="traits_8hpp.html#aa44fb0011435752a09a0f9b519f8d863">traits::add_const_shared_t</a>&lt; component::node_ptr &gt;</td></tr>
<tr class="separator:ae08a701f23b9d66e50801532769d7e06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa57bbf8ae15afeb77d85c3700520395"><td class="memItemLeft" align="right" valign="top"><a id="afa57bbf8ae15afeb77d85c3700520395"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>arc_const_ptr</b> = <a class="el" href="traits_8hpp.html#aa44fb0011435752a09a0f9b519f8d863">traits::add_const_shared_t</a>&lt; component::arc_ptr &gt;</td></tr>
<tr class="separator:afa57bbf8ae15afeb77d85c3700520395"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84a524dbd9f4b59a010f77a54249010f"><td class="memItemLeft" align="right" valign="top"><a id="a84a524dbd9f4b59a010f77a54249010f"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>stored_node_type</b> = std::list&lt; node_ptr &gt;</td></tr>
<tr class="separator:a84a524dbd9f4b59a010f77a54249010f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6912e2b6267d095bd0a459fccd2cba5"><td class="memItemLeft" align="right" valign="top"><a id="ac6912e2b6267d095bd0a459fccd2cba5"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>node_dictionary_type</b> = std::unordered_map&lt; node_const_ptr, std::size_t &gt;</td></tr>
<tr class="separator:ac6912e2b6267d095bd0a459fccd2cba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bde73c6f23ac4c8e1efd967be3fcc41"><td class="memItemLeft" align="right" valign="top"><a id="a3bde73c6f23ac4c8e1efd967be3fcc41"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>endpoint_dictionary_type</b> = std::unordered_map&lt; arc_const_ptr, std::pair&lt; node_const_ptr, node_const_ptr &gt; &gt;</td></tr>
<tr class="separator:a3bde73c6f23ac4c8e1efd967be3fcc41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a29dbeb2ac41b3b60e6b8e6871349bb"><td class="memItemLeft" align="right" valign="top"><a id="a8a29dbeb2ac41b3b60e6b8e6871349bb"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>adjacency_type</b> = std::vector&lt; std::vector&lt; arc_ptr &gt; &gt;</td></tr>
<tr class="separator:a8a29dbeb2ac41b3b60e6b8e6871349bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7e9b5530fa1be36f06d251e2117d543f"><td class="memItemLeft" align="right" valign="top"><a id="a7e9b5530fa1be36f06d251e2117d543f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a7e9b5530fa1be36f06d251e2117d543f">adjacency_matrix</a> ()=default</td></tr>
<tr class="memdesc:a7e9b5530fa1be36f06d251e2117d543f"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Default ctor) Initialize nodes and arcs as empty. <br /></td></tr>
<tr class="separator:a7e9b5530fa1be36f06d251e2117d543f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab14d158513da5a236674e4548efa277e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#ab14d158513da5a236674e4548efa277e">adjacency_matrix</a> (<a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> const &amp;)=default</td></tr>
<tr class="memdesc:ab14d158513da5a236674e4548efa277e"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Copy ctor) Initialize nodes and arcs by copying a parameter.  <a href="#ab14d158513da5a236674e4548efa277e">More...</a><br /></td></tr>
<tr class="separator:ab14d158513da5a236674e4548efa277e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f66ee613680d52e93f4a2407d0892eb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a2f66ee613680d52e93f4a2407d0892eb">adjacency_matrix</a> (<a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a2f66ee613680d52e93f4a2407d0892eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Move ctor) Initialize nodes and arcs by moving a parameter.  <a href="#a2f66ee613680d52e93f4a2407d0892eb">More...</a><br /></td></tr>
<tr class="separator:a2f66ee613680d52e93f4a2407d0892eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ff0a6c49658b14c4300b0ba7cc64ed4"><td class="memItemLeft" align="right" valign="top"><a id="a2ff0a6c49658b14c4300b0ba7cc64ed4"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a2ff0a6c49658b14c4300b0ba7cc64ed4">~adjacency_matrix</a> ()=default</td></tr>
<tr class="memdesc:a2ff0a6c49658b14c4300b0ba7cc64ed4"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Default dtor) <br /></td></tr>
<tr class="separator:a2ff0a6c49658b14c4300b0ba7cc64ed4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1686c835506377c0965293cd5b9de8b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#ae1686c835506377c0965293cd5b9de8b">operator=</a> (<a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> const &amp;rhs)</td></tr>
<tr class="memdesc:ae1686c835506377c0965293cd5b9de8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Copy operator=) Initialize nodes and arcs by copying a parameter.  <a href="#ae1686c835506377c0965293cd5b9de8b">More...</a><br /></td></tr>
<tr class="separator:ae1686c835506377c0965293cd5b9de8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08630541c0b09b4467132286665cf2d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a08630541c0b09b4467132286665cf2d4">operator=</a> (<a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a08630541c0b09b4467132286665cf2d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Move operator=) Initialize nodes and arcs by copying a parameter.  <a href="#a08630541c0b09b4467132286665cf2d4">More...</a><br /></td></tr>
<tr class="separator:a08630541c0b09b4467132286665cf2d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3fe5bfab47465dadcb7e75811672e3d"><td class="memItemLeft" align="right" valign="top">node_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#af3fe5bfab47465dadcb7e75811672e3d">add_node</a> (node_ptr const &amp;node)</td></tr>
<tr class="memdesc:af3fe5bfab47465dadcb7e75811672e3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a node into network.  <a href="#af3fe5bfab47465dadcb7e75811672e3d">More...</a><br /></td></tr>
<tr class="separator:af3fe5bfab47465dadcb7e75811672e3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeffc84b00aa2eb0ad233e6fa9dd0ca76"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#aeffc84b00aa2eb0ad233e6fa9dd0ca76">remove_node</a> (node_ptr const &amp;node)</td></tr>
<tr class="memdesc:aeffc84b00aa2eb0ad233e6fa9dd0ca76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the argument node from network.  <a href="#aeffc84b00aa2eb0ad233e6fa9dd0ca76">More...</a><br /></td></tr>
<tr class="separator:aeffc84b00aa2eb0ad233e6fa9dd0ca76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc28afe43d3613d68d12ef8130ddc46d"><td class="memItemLeft" align="right" valign="top">arc_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#abc28afe43d3613d68d12ef8130ddc46d">add_arc</a> (arc_ptr const &amp;arc, node_ptr const &amp;from, node_ptr const &amp;to)</td></tr>
<tr class="memdesc:abc28afe43d3613d68d12ef8130ddc46d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register an arc into network.  <a href="#abc28afe43d3613d68d12ef8130ddc46d">More...</a><br /></td></tr>
<tr class="separator:abc28afe43d3613d68d12ef8130ddc46d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a831a7bfc2725c17ea1f92018d38b59a7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a831a7bfc2725c17ea1f92018d38b59a7">remove_arc</a> (arc_ptr const &amp;arc) noexcept</td></tr>
<tr class="memdesc:a831a7bfc2725c17ea1f92018d38b59a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the argument arc from network.  <a href="#a831a7bfc2725c17ea1f92018d38b59a7">More...</a><br /></td></tr>
<tr class="separator:a831a7bfc2725c17ea1f92018d38b59a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a0f7187014326001d03f733fe364c6a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a7a0f7187014326001d03f733fe364c6a">remove_arc</a> (node_ptr const &amp;from, node_ptr const &amp;to) noexcept</td></tr>
<tr class="memdesc:a7a0f7187014326001d03f733fe364c6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the argument arc from network.  <a href="#a7a0f7187014326001d03f733fe364c6a">More...</a><br /></td></tr>
<tr class="separator:a7a0f7187014326001d03f733fe364c6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdeafe65325ba05e9ad1c7f72d7ca1ac"><td class="memItemLeft" align="right" valign="top">arc_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#afdeafe65325ba05e9ad1c7f72d7ca1ac">is_adjacent</a> (node_ptr const &amp;from, node_ptr const &amp;to) const</td></tr>
<tr class="memdesc:afdeafe65325ba05e9ad1c7f72d7ca1ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether two nodes are adjacent by a arc in the network.  <a href="#afdeafe65325ba05e9ad1c7f72d7ca1ac">More...</a><br /></td></tr>
<tr class="separator:afdeafe65325ba05e9ad1c7f72d7ca1ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3197b094434e85848f3bdee9bb740080"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a3197b094434e85848f3bdee9bb740080">is_connect</a> (node_ptr const &amp;node, arc_ptr const &amp;arc) const noexcept</td></tr>
<tr class="memdesc:a3197b094434e85848f3bdee9bb740080"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether a node and an arc are connected in the network.  <a href="#a3197b094434e85848f3bdee9bb740080">More...</a><br /></td></tr>
<tr class="separator:a3197b094434e85848f3bdee9bb740080"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad398cf36e8f27e219dee05fe9429a0d2"><td class="memItemLeft" align="right" valign="top">node_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#ad398cf36e8f27e219dee05fe9429a0d2">source</a> (arc_ptr const &amp;arc) const noexcept</td></tr>
<tr class="memdesc:ad398cf36e8f27e219dee05fe9429a0d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain a source (parent) node of an arc.  <a href="#ad398cf36e8f27e219dee05fe9429a0d2">More...</a><br /></td></tr>
<tr class="separator:ad398cf36e8f27e219dee05fe9429a0d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4f5c3ee06fd608989ada1fb77a43b4d"><td class="memItemLeft" align="right" valign="top">node_ptr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#ad4f5c3ee06fd608989ada1fb77a43b4d">target</a> (arc_ptr const &amp;arc) const noexcept</td></tr>
<tr class="memdesc:ad4f5c3ee06fd608989ada1fb77a43b4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain a target (child) node of an arc.  <a href="#ad4f5c3ee06fd608989ada1fb77a43b4d">More...</a><br /></td></tr>
<tr class="separator:ad4f5c3ee06fd608989ada1fb77a43b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa92bafa3f9c3b22d08dee2095042ef0c"><td class="memItemLeft" align="right" valign="top">std::vector&lt; node_ptr &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#aa92bafa3f9c3b22d08dee2095042ef0c">parent_nodes</a> (node_ptr const &amp;child) const</td></tr>
<tr class="memdesc:aa92bafa3f9c3b22d08dee2095042ef0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain a list of all nodes which are parent of the child (argument).  <a href="#aa92bafa3f9c3b22d08dee2095042ef0c">More...</a><br /></td></tr>
<tr class="separator:aa92bafa3f9c3b22d08dee2095042ef0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35ec62aed27f33404ff2188728070f3c"><td class="memItemLeft" align="right" valign="top">std::vector&lt; node_ptr &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a35ec62aed27f33404ff2188728070f3c">child_nodes</a> (node_ptr const &amp;parent) const</td></tr>
<tr class="memdesc:a35ec62aed27f33404ff2188728070f3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain a list of all nodes which are child of the parent (argument).  <a href="#a35ec62aed27f33404ff2188728070f3c">More...</a><br /></td></tr>
<tr class="separator:a35ec62aed27f33404ff2188728070f3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1067f195eaa0abc2ae0ff316d14d425"><td class="memItemLeft" align="right" valign="top"><a id="ae1067f195eaa0abc2ae0ff316d14d425"></a>
std::vector&lt; node_ptr &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#ae1067f195eaa0abc2ae0ff316d14d425">all_node</a> () const</td></tr>
<tr class="memdesc:ae1067f195eaa0abc2ae0ff316d14d425"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain all node pointers. <br /></td></tr>
<tr class="separator:ae1067f195eaa0abc2ae0ff316d14d425"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8663d697a4ebc12cec6f4a77dd5323bf"><td class="memItemLeft" align="right" valign="top"><a id="a8663d697a4ebc12cec6f4a77dd5323bf"></a>
std::vector&lt; arc_ptr &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classbn_1_1adjacency__matrix.html#a8663d697a4ebc12cec6f4a77dd5323bf">all_arc</a> () const</td></tr>
<tr class="memdesc:a8663d697a4ebc12cec6f4a77dd5323bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain all arc pointers. <br /></td></tr>
<tr class="separator:a8663d697a4ebc12cec6f4a77dd5323bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Implement class of adjacency matrix for <a class="el" href="classbn_1_1network.html" title="Provide a functions for each graph representing class. ">bn::network</a>. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab14d158513da5a236674e4548efa277e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab14d158513da5a236674e4548efa277e">&#9670;&nbsp;</a></span>adjacency_matrix() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bn::adjacency_matrix::adjacency_matrix </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> const &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>(Copy ctor) Initialize nodes and arcs by copying a parameter. </p>
<p>The parameter will "not" be destroyed (still valid). </p>

</div>
</div>
<a id="a2f66ee613680d52e93f4a2407d0892eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f66ee613680d52e93f4a2407d0892eb">&#9670;&nbsp;</a></span>adjacency_matrix() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bn::adjacency_matrix::adjacency_matrix </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>(Move ctor) Initialize nodes and arcs by moving a parameter. </p>
<p>The parameter will be destroyed. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="abc28afe43d3613d68d12ef8130ddc46d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc28afe43d3613d68d12ef8130ddc46d">&#9670;&nbsp;</a></span>add_arc()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">arc_ptr bn::adjacency_matrix::add_arc </td>
          <td>(</td>
          <td class="paramtype">arc_ptr const &amp;&#160;</td>
          <td class="paramname"><em>arc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>to</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register an arc into network. </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">arc</td><td>an arc. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">from</td><td>a node which is a start point of the arc. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">to</td><td>a node which is an end point of the arc. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The arc which is identical with the parameter. </dd></dl>

</div>
</div>
<a id="af3fe5bfab47465dadcb7e75811672e3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3fe5bfab47465dadcb7e75811672e3d">&#9670;&nbsp;</a></span>add_node()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">node_ptr bn::adjacency_matrix::add_node </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Register a node into network. </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<p>param[in] node: Target node. </p><dl class="section return"><dt>Returns</dt><dd>The node which is identical with the parameter. </dd></dl>

</div>
</div>
<a id="a35ec62aed27f33404ff2188728070f3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35ec62aed27f33404ff2188728070f3c">&#9670;&nbsp;</a></span>child_nodes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;node_ptr&gt; bn::adjacency_matrix::child_nodes </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>parent</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain a list of all nodes which are child of the parent (argument). </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">parent</td><td>a node which is an start point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a list of all nodes. </dd></dl>

</div>
</div>
<a id="afdeafe65325ba05e9ad1c7f72d7ca1ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdeafe65325ba05e9ad1c7f72d7ca1ac">&#9670;&nbsp;</a></span>is_adjacent()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">arc_ptr bn::adjacency_matrix::is_adjacent </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>to</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check whether two nodes are adjacent by a arc in the network. </p>
<p>No-throw guarantee: never throws exceptions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">from</td><td>a node which is a start point. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">to</td><td>a node which is an end point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if from and to are adjacent; otherwise false. </dd></dl>

</div>
</div>
<a id="a3197b094434e85848f3bdee9bb740080"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3197b094434e85848f3bdee9bb740080">&#9670;&nbsp;</a></span>is_connect()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int bn::adjacency_matrix::is_connect </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">arc_ptr const &amp;&#160;</td>
          <td class="paramname"><em>arc</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Check whether a node and an arc are connected in the network. </p>
<p>No-throw guarantee: never throws exceptions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>a node which is a start or end point. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arc</td><td>an arc. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>&gt; 0 : the node is a start (parent) node of the arc; &lt; 0 : the node is an end (child) node of the arc; = 0 : the node does not connect to the arc. </dd></dl>

</div>
</div>
<a id="ae1686c835506377c0965293cd5b9de8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1686c835506377c0965293cd5b9de8b">&#9670;&nbsp;</a></span>operator=() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a>&amp; bn::adjacency_matrix::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> const &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>(Copy operator=) Initialize nodes and arcs by copying a parameter. </p>
<p>The parameter will "not" be destroyed (still valid). </p>

</div>
</div>
<a id="a08630541c0b09b4467132286665cf2d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08630541c0b09b4467132286665cf2d4">&#9670;&nbsp;</a></span>operator=() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a>&amp; bn::adjacency_matrix::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbn_1_1adjacency__matrix.html">this_type</a> &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>(Move operator=) Initialize nodes and arcs by copying a parameter. </p>
<p>The parameter will be destroyed. </p>

</div>
</div>
<a id="aa92bafa3f9c3b22d08dee2095042ef0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa92bafa3f9c3b22d08dee2095042ef0c">&#9670;&nbsp;</a></span>parent_nodes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;node_ptr&gt; bn::adjacency_matrix::parent_nodes </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>child</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain a list of all nodes which are parent of the child (argument). </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">child</td><td>a node which is an end point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a list of all nodes. </dd></dl>

</div>
</div>
<a id="a831a7bfc2725c17ea1f92018d38b59a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a831a7bfc2725c17ea1f92018d38b59a7">&#9670;&nbsp;</a></span>remove_arc() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool bn::adjacency_matrix::remove_arc </td>
          <td>(</td>
          <td class="paramtype">arc_ptr const &amp;&#160;</td>
          <td class="paramname"><em>arc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the argument arc from network. </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">arc</td><td>Target arc. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the node was successfully removed; otherwise false. </dd></dl>

</div>
</div>
<a id="a7a0f7187014326001d03f733fe364c6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a0f7187014326001d03f733fe364c6a">&#9670;&nbsp;</a></span>remove_arc() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool bn::adjacency_matrix::remove_arc </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>to</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the argument arc from network. </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">from</td><td>a node which is a start point of the arc wanted to remove. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">to</td><td>a node which is an end point of the arc wanted to remove. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the node was successfully removed; otherwise false. </dd></dl>

</div>
</div>
<a id="aeffc84b00aa2eb0ad233e6fa9dd0ca76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeffc84b00aa2eb0ad233e6fa9dd0ca76">&#9670;&nbsp;</a></span>remove_node()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool bn::adjacency_matrix::remove_node </td>
          <td>(</td>
          <td class="paramtype">node_ptr const &amp;&#160;</td>
          <td class="paramname"><em>node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Remove the argument node from network. </p>
<p>Strong guarantee: if an exception is thrown, there are no changes in the network.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">node</td><td>Target node. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the node was successfully removed; otherwise false. </dd></dl>

</div>
</div>
<a id="ad398cf36e8f27e219dee05fe9429a0d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad398cf36e8f27e219dee05fe9429a0d2">&#9670;&nbsp;</a></span>source()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">node_ptr bn::adjacency_matrix::source </td>
          <td>(</td>
          <td class="paramtype">arc_ptr const &amp;&#160;</td>
          <td class="paramname"><em>arc</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain a source (parent) node of an arc. </p>
<p>No-throw guarantee: never throws exceptions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">arc</td><td>an arc </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a source node pointer if it is exist; otherwise false </dd></dl>

</div>
</div>
<a id="ad4f5c3ee06fd608989ada1fb77a43b4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4f5c3ee06fd608989ada1fb77a43b4d">&#9670;&nbsp;</a></span>target()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">node_ptr bn::adjacency_matrix::target </td>
          <td>(</td>
          <td class="paramtype">arc_ptr const &amp;&#160;</td>
          <td class="paramname"><em>arc</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain a target (child) node of an arc. </p>
<p>No-throw guarantee: never throws exceptions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">arc</td><td>an arc. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a target node pointer if it is exist; otherwise false. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>bayesian/network/<a class="el" href="adjacency__matrix_8hpp_source.html">adjacency_matrix.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
